﻿<Window x:Class="kursovaya.Windows.InventoryControl"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:local="clr-namespace:kursovaya.Windows"
        xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
        mc:Ignorable="d"
        Title="Инвентарный учёт" Height="450" Width="780">
    <Grid Background="LightSeaGreen">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <ScrollViewer Grid.Column="0" Margin="10">
            <DataGrid x:Name="InventoryDataGrid" AutoGenerateColumns="False" CanUserAddRows="False"
                      CanUserDeleteRows="False"
                      Background="{DynamicResource MaterialDesignPaper}"
                      BorderBrush="{DynamicResource MaterialDesignDivider}"
                      RowBackground="{DynamicResource MaterialDesignSelection}"
                      BorderThickness="1"
                      AlternatingRowBackground="{DynamicResource MaterialDesignTransparent}">
                <DataGrid.Columns>
                    <DataGridTextColumn Header="ID" Binding="{Binding id}"
                                        FontSize="14" FontWeight="Bold"
                                        Foreground="{DynamicResource MaterialDesignBody}" Width="80"
                                        HeaderStyle="{StaticResource MaterialDesignDataGridColumnHeader}">
                        <DataGridTextColumn.ElementStyle>
                            <Style TargetType="{x:Type TextBlock}">
                                <Setter Property="TextWrapping" Value="Wrap" />
                            </Style>
                        </DataGridTextColumn.ElementStyle>
                    </DataGridTextColumn>

                    <DataGridTextColumn Header="Имя" Binding="{Binding Name}"
                                        FontSize="14" FontWeight="Bold"
                                        Foreground="{DynamicResource MaterialDesignBody}" Width="*"
                                        HeaderStyle="{StaticResource MaterialDesignDataGridColumnHeader}">
                        <DataGridTextColumn.ElementStyle>
                            <Style TargetType="{x:Type TextBlock}">
                                <Setter Property="TextWrapping" Value="Wrap" />
                            </Style>
                        </DataGridTextColumn.ElementStyle>
                    </DataGridTextColumn>

                    <DataGridTextColumn Header="Тип" Binding="{Binding Type}"
                                        FontSize="14" FontWeight="Bold"
                                        Foreground="{DynamicResource MaterialDesignBody}" Width="*"
                                        HeaderStyle="{StaticResource MaterialDesignDataGridColumnHeader}">
                        <DataGridTextColumn.ElementStyle>
                            <Style TargetType="{x:Type TextBlock}">
                                <Setter Property="TextWrapping" Value="Wrap" />
                            </Style>
                        </DataGridTextColumn.ElementStyle>
                    </DataGridTextColumn>

                    <DataGridTextColumn Header="Количество" Binding="{Binding Amount}"
                                        FontSize="14" FontWeight="Bold"
                                        Foreground="{DynamicResource MaterialDesignBody}" Width="*"
                                        HeaderStyle="{StaticResource MaterialDesignDataGridColumnHeader}">
                        <DataGridTextColumn.ElementStyle>
                            <Style TargetType="{x:Type TextBlock}">
                                <Setter Property="TextWrapping" Value="Wrap" />
                            </Style>
                        </DataGridTextColumn.ElementStyle>
                    </DataGridTextColumn>

                    <DataGridTextColumn Header="Описание" Binding="{Binding Description}" Width="*"
                                        FontSize="14" FontWeight="Bold"
                                        Foreground="{DynamicResource MaterialDesignBody}"
                                        HeaderStyle="{StaticResource MaterialDesignDataGridColumnHeader}">
                        <DataGridTextColumn.ElementStyle>
                            <Style TargetType="{x:Type TextBlock}">
                                <Setter Property="TextWrapping" Value="Wrap" />
                            </Style>
                        </DataGridTextColumn.ElementStyle>
                    </DataGridTextColumn>
                </DataGrid.Columns>
            </DataGrid>
        </ScrollViewer>

       
    </Grid>
</Window>